package cn.cdeden.knowledge.service;

import cn.cdeden.common.core.utils.page.TableDataInfo;
import cn.cdeden.knowledge.domain.TeamRelevanceType;
import cn.cdeden.knowledge.domain.dto.TeamRelevanceTypeDto;
import cn.cdeden.knowledge.domain.dto.TeamRelevanceTypeQueryParam;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Set;

/**
* @author Chen
* @date 2024-04-21
*/
public interface TeamRelevanceTypeService extends IService<TeamRelevanceType> {

    static final String CACHE_KEY = "teamRelevanceType";

    /**
    * 查询数据分页
    * @param query 条件
    * @param pageable 分页参数
    * @return PageInfo<TeamRelevanceTypeDto>
    */
    TableDataInfo<TeamRelevanceTypeDto> queryAll(TeamRelevanceTypeQueryParam query, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param query 条件参数
    * @return List<TeamRelevanceTypeDto>
    */
    List<TeamRelevanceTypeDto> queryAll(TeamRelevanceTypeQueryParam query);

    TeamRelevanceType getById(Integer id);

    List<String> getByTypeId(String typeId);

    /**
     * 插入一条新数据。
     */
    boolean insert(TeamRelevanceTypeDto resources);
    boolean updateById(TeamRelevanceTypeDto resources);
    boolean deleteById(Integer id);

    boolean deleteRelevanceType(TeamRelevanceTypeDto resources);

    boolean deleteTypeId(Integer typeId);
    boolean deleteByIds(Set<Integer> ids);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    // void download(List<TeamRelevanceTypeDto> all, HttpServletResponse response) throws IOException;
}
